﻿<%@ Page Language="C#" MasterPageFile="~/tokenTeam/TokenMaster.master" AutoEventWireup="true" CodeFile="messageAdmin.aspx.cs" Inherits="tokenTeam_message" Title="留言板管理" %>
<%@ Register Assembly="pager" Namespace="wbh" TagPrefix="uc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="headHolder" Runat="Server">
    <link href="style/admin.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentHolder" Runat="Server">
    <!-- 留言内容部分 -->
      <div class="detailBox">
      <p>
        <asp:ImageButton ID="ImageButton2" ImageUrl ="images/msgDelete.jpg" runat="server" CausesValidation="False" AlternateText="删除" CssClass="img_buttom" Width="30px" Height="30px" OnClientClick="return confirm('你是否真的要全部删除？');" OnClick="msgDelettAll_Click"  CommandArgument='<%#Eval("id") %>' />
        <asp:ImageButton ID="ImageButton3" ImageUrl ="images/msgDelete.jpg" runat="server" CausesValidation="False" AlternateText="删除" CssClass="img_buttom" Width="30px" Height="30px" OnClientClick="return confirm('你是否真的删除？');" OnClick="msgDelettSelected_Click"  CommandArgument='<%#Eval("id") %>' />
      </p>
        <asp:Repeater ID="rptMsgBox" OnItemDataBound="repMsgBox_ItemDataBound" runat="server">
            <HeaderTemplate><ul></HeaderTemplate>
            <ItemTemplate>
                <li>
                    <div class="messageBox">
                        <table class="message" style="border:1px solid #300;">
                            <tr>
                                <td style="width:35%;"><span class=""><%# Helper.Function.StringLeftAlign(Eval("title").ToString(), 15, "...")%></span></td>
                                <td style="width:20%;"><span><%# Helper.Function.StringLeftAlign(Eval("nickname").ToString(), 15, "...")%></span></td>
                                <td style="width:20%;"><span><%# Helper.Function.StringLeftAlign(Eval("email").ToString(), 15, "...")%></span></td>
                                <td style="width:18%;"><span class=""><%#Helper.Function.DateTimeSafeConvert(Eval("time_add")).ToString("yyyy-M-d mm:ss") %></span></td>
                                <td style="width:5%;">
                                    <asp:CheckBox ID="ckbDelete" runat="server"/>
                                    <asp:Label ID="lbMsgId" Text='<%# Eval("id").ToString()%>' Visible="false" runat="server"></asp:Label>
                                </td>  
                            </tr>
                            <tr>
                                <td style="width:85%;" colspan="4"><div class="margin_left"><%#Helper.Function.NormalizeJSString(Server.HtmlEncode(Eval("content").ToString()))%></div></td>
                                <td style="width:15%;">
                                    <p><asp:ImageButton ImageUrl ="images/msgDelete.jpg" runat="server" CausesValidation="False" AlternateText="删除" CssClass="img_buttom" Width="30px" Height="30px" OnClientClick="return confirm('你是否真的删除？');" OnClick="msgDelett_Click"  CommandArgument='<%#Eval("id") %>' /></p>
                                    <p><asp:ImageButton ID="ImageButton1" ImageUrl ="" runat="server" AlternateText="回复" OnClick="msgReply_Click"  CommandArgument='<%#Eval("id") %>' /></p>
                                   
                                </td>
                            </tr>
                        </table>
                        <asp:Repeater ID="rpt_MsgRelpy" runat="server">
                            <ItemTemplate>
                                <table class="message" style="border:1px solid #700;">
                                    <tr>
                                        <td style="width:15%" ></td>
                                        <td style="width:70%"><span class="">回复时间：<%#Helper.Function.DateTimeSafeConvert(Eval("reply_time")).ToString("yyyy-M-d mm:ss") %></span></td>
                                        
                                        <td style="width:5%"><p><asp:ImageButton ImageUrl ="" runat="server" alt="删除" OnClick="replyDelet_Click"/></p></td>
                                    </tr>
                                    <tr> 
                                        <td style="width:15%;"></td>   
                                        <td style="width:80%" colspan="2"><div class=""><%#Helper.Function.NormalizeJSString(Server.HtmlEncode(Eval("content").ToString()))%></div></td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:Repeater> 
                    </div>
                </li>
            </ItemTemplate>
            <FooterTemplate></ul></FooterTemplate>
        </asp:Repeater>
      </div>  
      <!-- 分页部分(下) -->
      <div class="pageView"> 
        <div id="spPager">
            <uc:SimplePager CssGotoButton="gotobt" CssGotoPanel="goto" PageSize="10" StringFormatGotoLabelHtml="转到第{0}页"
                        StringFormatPagerButton="<span title='转到第{0}页'>{0}</span>" StringFormatCurrentPagerButton="<a class='current'>{0}</a>"
                        CssClass="pagination" InnerGroupTagBlock="<ul>{0}</ul>" InnerItemTagBlock="<li>{0}</li>"
                        ID="spPager" runat="server" OnPageIndexChanging="SimplePager1_PageIndexChanging"
                        UrlPaging="False">
            </uc:SimplePager>
	    </div>
      </div>
</asp:Content>

